<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hello</title>
    <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
</head>
<body>
    <script>
        $.getJSON("hello2?name=Tom&date=2992-5-25 13:01:46", function(map, status){
            document.write('response status: ' + status);
            for (const key in map) {
                document.write("<br>");
                document.write(key + ': ' + map[key]);
            }
        });

        const obj = {name: "Tom", date: "2992-5-25 13:01:46"};
        $.ajax({
            type: "POST",
            url: "hello3",
            data: JSON.stringify(obj),
            contentType: "application/json",
            success: function (data) {
                document.write("<hr>")
                for (const key in data) {
                    document.write("<br>");
                    document.write(key + ': ' + data[key]);
                }
            }
        })
    </script>
</body>
</html>